
//获取用户信息
function getUserInfo() {
	var localStringData = localStorage.getItem("localUserData");
	var _serverData = JSON.parse(localStringData);
	var userInfo;
	if (_serverData) {
		userInfo = _serverData.data.userInfo;
	}

	return userInfo
}

//获取当前页面的增删改查等权限
function getRightByPageName(pageName){
	var rightList = []
	var authority_list = getUserInfo().authority_list;
	$.each(authority_list,function(index,value){
		$.each(value.child_list, function(secondIndex,secondValue) {
			if(secondValue.name == $.trim(pageName)){
				rightList = secondValue.child_list
				return false
			}
		});
	})
	return rightList
}

